﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>ERP仓储管理系统</title>
    <link th:href="@{/css/style.css}" rel="stylesheet" type="text/css"/>
    <script language="JavaScript" th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/cloud.js}" type="text/javascript"></script>

    <script language="javascript">
        $(function () {
            $('.loginbox').css({'position': 'absolute', 'left': ($(window).width() - 692) / 2});
            $(window).resize(function () {
                $('.loginbox').css({'position': 'absolute', 'left': ($(window).width() - 692) / 2});
            })
        });
    </script>

</head>

<body style="background-color:#df7611; background-image:url(images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">

<div id="mainBody">
    <div id="cloud1" class="cloud"></div>
    <div id="cloud2" class="cloud"></div>
</div>


<div class="logintop">
    <span>ERP仓储管理系统</span>
</div>

<div class="loginbody">

    <span class="systemlogo"></span>

    <div class="loginbox loginbox1">
        <form th:action="@{/sys/users/login}" method="post">
            <ul>
                <li>
                    <span th:text="${msg}" style="color: red;font-weight: bold;font-size:15px;"></span>
                    <input name="uname" type="text" class="loginuser" value="马云" onclick="JavaScript:this.value=''"/>
                </li>
                <li><input name="upassword" type="password" class="loginpwd" value="123"
                           onclick="JavaScript:this.value=''"/></li>
                <li class="yzm">
                    <span><input name="verifycode" type="text" value=""  onclick="javascript:this.value=''" /></span><cite><img
                        onclick="javascript:getvCode()" id="verifyimg"/></cite>
                </li>
                <li><input name="" type="submit" class="loginbtn" value="登录"/><label><input name="" type="checkbox"
                                                                                            value="" checked="checked"/>记住密码</label><label><a
                        href="#">忘记密码？</a></label></li>
            </ul>
        </form>
    </div>

</div>


<div class="loginbm">版权归江西朝腾科技所有，仅供学习交流，勿用于任何商业用途</div>
<script>
    getvCode();

    /**
     * 获取验证码
     * 将验证码写到login.html页面的id = verifyimg 的地方
     */
    function getvCode() {
        document.getElementById("verifyimg").src = timestamp("/erp/sys/users/verifyCode");
    }

    //为url添加时间戳
    function timestamp(url) {
        var getTimestamp = new Date().getTime();
        if (url.indexOf("?") > -1) {
            url = url + "&timestamp=" + getTimestamp
        } else {
            url = url + "?timestamp=" + getTimestamp
        }
        return url;
    }

</script>

</body>

</html>
